#include <bits/stdc++.h>
using namespace std;

int main() {
	int sum;
	cin >> sum;
	int money = sum / 52 / 7;
	int x, k = 1;
	x = money - 3 * k;
	while (x > 100) {
		k++;
		x = money - 3 * k;
	}
	cout << x << endl << k;
	return 0;
}